package com.tuanzi.loan.web.lazy.settlementsystem;

import com.tuanzi.loan.business.service.settlementsystem.SettlementCompanyService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.settlementsystem.SettlementCompanyAmountRequest;
import com.tuanzi.loan.vo.request.settlementsystem.SettlementCompanyRequest;
import com.tuanzi.loan.vo.response.settlementsystem.SettlementCompanyResponse;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-01-25 20:17
 */
public class SettlementCompanyAmountLazyDataModel extends BaseLazyDataModel<SettlementCompanyAmountRequest,SettlementCompanyResponse> {
    private SettlementCompanyService settlementCompanyService = SpringContextHolder.getBean(SettlementCompanyService.class);
    public SettlementCompanyAmountLazyDataModel(SettlementCompanyAmountRequest settlementCompanyAmountRequest) {
        super(settlementCompanyAmountRequest);
    }
    @Override
    protected Page<SettlementCompanyResponse> doLoad(PageSearcher<SettlementCompanyAmountRequest> pageSearcher) {
        return settlementCompanyService.listAmount(pageSearcher);
    }
}
